#coding=utf-8

from lib.tornado_routes import route
from web.handler import BaseHandler
from tornado import gen
from tornado.web import asynchronous
# from web.models.admin.user.student import Student
# from decorator.auth import admin_login_required, admin_auth


@route(r'/user/box/?', name='user.box')
class IndexHandler(BaseHandler):

    @asynchronous
    @gen.coroutine
    # @admin_auth
    def get(self):
        self.render("user/box/index.html",)

@route(r'/user/box/old?', name='user.box_old')
class OldHandler(BaseHandler):

    @asynchronous
    @gen.coroutine
    # @admin_auth
    def get(self):
        self.render("user/box/old.html",)

@route(r'/user/box/clist?', name='user.box_clist')
class cListHandler(BaseHandler):

    @asynchronous
    @gen.coroutine
    # @admin_auth
    def get(self):
        cur_page = self.get_argument('page', default=1)
        page = (int(cur_page) - 1) * self.offset

        self.render("user/box/clist.html",)